*Chapter 2 Commands
*Use 'Chapter 2 Cross Country data'

*Figure 2.4: Carbon Emissions and Urbanization in 2018
gen clock=12
twoway (lfit urban2018 lCO2pc) (scatter urban2018 lCO2pc, mlabel(outlierurb) msize(small) mcolor(black) mlabcolor(black) mlabvpos(clock)) if _merge==3, ytitle(Percentage Urban) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.5: Carbon Emissions and Labour Force in Agriculture in 2018
twoway (lfit agemploy2018 lCO2pc) (scatter agemploy2018 lCO2pc, msize(small) mcolor(black)) if _merge==3, ylabel(0 20 40 60 80) ytitle(Percentage of Labour Force in Agriculture) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.6: Carbon Emissions and Labour Force in Industry in 2018
twoway (lfit indemploy2018 lCO2pc) (scatter indemploy2018 lCO2pc, mlabel(ManufacturingEmployOutlier) msize(small) mcolor(black) mlabcolor(black)) if _merge==3, ytitle(Percentage of Labour Force in Industry) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.7: Carbon Emissions and Cement Production per capita in 2018
gen clock=12
twoway (lfit lCementpc lCO2pc) (scatter lCementpc lCO2pc, mlabel( outlierCement ) mlabvpos(clock) msize(small) mcolor(black) mlabcolor(black)) if _merge==3, ytitle(Cement Production per capita (log)) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.8: Carbon Emissions and Electricity Consumption per capita in 2018
twoway (lfit ElectricityUSEIA lCO2pc) (scatter ElectricityUSEIA lCO2pc, mlabel( outlierElectricity ) msize(small) mcolor(black) mlabcolor(black)) if _merge==3, ytitle(Electricity Consumption per capita (log)) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.9: Carbon Emissions and GDP per capita in 2018
twoway (scatter lGDPpc lCO2pc, mcolor(black) msize(small)) if _merge==3, ytitle(GDP per capita (log)) xtitle(Carbon Emissions per capita (log)) legend(off)

*Figure 2.10: Carbon Emissions and Industry as a % of GDP in 2018
twoway (scatter IndustryGDP2018 lCO2pc, mcolor(black) msize(small)) if _merge==3, ytitle(Industry Share of GDP) xtitle(Carbon Emissions per capita (log)) legend(off)